<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>	
<%@page import="com.yaodian100.mall.member.util.UserData"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@taglib prefix="pu" uri="/WEB-INF/tld/pageutil.tld" %>
<%@taglib prefix="mu" uri="/WEB-INF/tld/mallutil.tld" %>
<%@taglib prefix="yaodian100" uri="/WEB-INF/tld/yaodian100.tld" %>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 	
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<%@page import="com.yaodian100.ec.product.entity.Product"%>
<%@page import="java.math.BigDecimal"%>
<c-rt:set var="imgDomain"><%=ServerValue.getImgDomain()%></c-rt:set>
<%@taglib prefix="pu" uri="/WEB-INF/tld/pageutil.tld" %>
<link rel="stylesheet" href="/css/yaodian100_ordercar_v2.css" type="text/css" media="screen" />
<script language="javascript">
$().ready(function(){
	$("#dialog").dialog({
		bgiframe: true,
		height: 480,
		width:650,
		modal: true,
		overlay: { opacity: 0.5, background: "black" }
	});
	<yaodian100:specSelectJs2 prodMajors="${prodMajors}" prodInvMap="${prodInvMap}"/>
	$("#addCartDialogBtn").click(function(){	
		if ( "" == $("#selectSs_" + "${product.productId}").val() ){
			$("#selSpecTip").show();
		}else{
			$("#selSpecTip").hide();
			addCampaignProductSpec("${campaignProduct.uuid}",$("#selectSs_" + "${product.productId}").val());
			closeDialog('campaignProductDialog');
			return false;
		}
	});
	$("#closeDialogBtn").click(function(){	
		closeDialog('campaignProductDialog');
		return false;
	});
});
</script>
<div id="dialog" class="showadd"> 
	<div class="pimage"><img id="changeCampaignImg" src="${imgDomain}/PImg/${pu:substring(product.productId, 0, 4)}/${product.productId }/${product.productId }_m250.jpg" onError="this.src='${imgDomain}/PImg/blank_250.gif'" alt="" width="250" height="250"/></div>
  <div class="pd-infobox">
  	<div class="infoboxheader">
    	<h1>${product.productName}</h1>
    </div>
    ${pu:reqSet('brief',mu:productBrief(product.productId))}
    <pre class="infocontent">${brief!=null?brief:'<br/><br/>'}</pre>
    <div class="infocontent-type">
    	<c-rt:if test="${volumeOfProduct}">
	     	<p>运送限定：<span class="txt-rd">大材积</span><a href="/help/1_bigsize.html" target="_blank">(详情)</a></p>
	    </c-rt:if>
    	<p>商品重量：
    	<c-rt:if test="${product.productWeight>0}">
    		<fmt-rt:formatNumber value="${(product.productWeight+0.001)/1000.0}" pattern="#,#0.00#" />
    	</c-rt:if>
    	<c-rt:if test="${product.productWeight<=0}">0</c-rt:if>
    	KG (<a href="/help/6_deliveryfee.html" target="_blank">重量与运费说明</a>)</p>
    </div>
    <div class="grey-price">市场价：
    	<c-rt:if test="${!empty product.listPrice}">￥<fmt-rt:formatNumber value="${product.listPrice}"  pattern="####0.0"/></c-rt:if>
    </div>
    <div class="infocontent-price">加购价:<b>￥<fmt-rt:formatNumber value="${campaignProduct.price}" pattern="######0.0" /></b></div>
    <!-- 雙屬性版 -->
   	<div class="select-area">
   		<yaodian100:specSelect mainCodeLabel="${product.mainCodeLabel}" secondCodeLabel="${product.secondCodeLabel}" productId="${product.productId}" productSpecMajors="${product.activateSpecMajors}"/>
   		<span id="selSpecTip" class="msg rn" style="display:none;">请选择属性</span>
		</div>
   	<!-- 雙屬性版 -->
   	<div class="bt-box">
   		<p>
   			<a id="addCartDialogBtn" title="加入购物车" class="btn-mid" href="javascript:;">加入购物车</a> 
   			<a id="closeDialogBtn" href="javascript:;" class="btn-mid">关闭</a>
   		</p>
		</div>
  </div>
</div>
<div id="alertCampaignProductDialog"></div>